package com.enfi.business.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.enfi.business.mapper.BusinessDeviceMapper;
import com.enfi.business.domain.BusinessDevice;
import com.enfi.business.service.IBusinessDeviceService;

/**
 * 设备Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-04-01
 */
@Service
public class BusinessDeviceServiceImpl implements IBusinessDeviceService 
{
    @Autowired
    private BusinessDeviceMapper businessDeviceMapper;

    /**
     * 查询设备
     * 
     * @param id 设备主键
     * @return 设备
     */
    @Override
    public BusinessDevice selectBusinessDeviceById(Long id)
    {
        return businessDeviceMapper.selectBusinessDeviceById(id);
    }

    /**
     * 查询设备列表
     * 
     * @param businessDevice 设备
     * @return 设备
     */
    @Override
    public List<BusinessDevice> selectBusinessDeviceList(BusinessDevice businessDevice)
    {
        return businessDeviceMapper.selectBusinessDeviceList(businessDevice);
    }

    /**
     * 新增设备
     * 
     * @param businessDevice 设备
     * @return 结果
     */
    @Override
    public int insertBusinessDevice(BusinessDevice businessDevice)
    {
        return businessDeviceMapper.insertBusinessDevice(businessDevice);
    }

    /**
     * 修改设备
     * 
     * @param businessDevice 设备
     * @return 结果
     */
    @Override
    public int updateBusinessDevice(BusinessDevice businessDevice)
    {
        return businessDeviceMapper.updateBusinessDevice(businessDevice);
    }

    /**
     * 批量删除设备
     * 
     * @param ids 需要删除的设备主键
     * @return 结果
     */
    @Override
    public int deleteBusinessDeviceByIds(Long[] ids)
    {
        return businessDeviceMapper.deleteBusinessDeviceByIds(ids);
    }

    /**
     * 删除设备信息
     * 
     * @param id 设备主键
     * @return 结果
     */
    @Override
    public int deleteBusinessDeviceById(Long id)
    {
        return businessDeviceMapper.deleteBusinessDeviceById(id);
    }
}
